<template>
  <el-dialog :visible.sync="visible" v-dialogDrag :title="title" :close-on-click-modal="false" class="tl-dialog" width="1200px" @open="open" @close="close">
    <el-form class="tl-form" ref="form" :model="model" :rules="rules" label-width="150px" :disabled="disableEditSubmit">
			<el-row>
				<el-col :span="12">
					<el-form-item label="序号" prop="ordercode" >
						<el-input v-model="model.ordercode"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="任务名称" prop="taskname" >
						<el-input v-model="model.taskname" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="任务内容" prop="taskdetail" >
						<el-input v-model="model.taskdetail" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="任务编号" prop="taskcode" >
						<el-input v-model="model.taskcode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="责任人工号" prop="responsiblecode" >
						<el-input v-model="model.responsiblecode"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="责任人" prop="responsible" >
						<el-input v-model="model.responsible"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="计划开始日期" prop="planstartdate" >
						<el-date-picker v-model="model.planstartdate" type="date" placeholder="计划开始日期" value-format="yyyy-MM-dd"></el-date-picker>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="计划完成日期" prop="planenddate" >
						<el-date-picker v-model="model.planenddate" type="date" placeholder="计划完成日期" value-format="yyyy-MM-dd"></el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="实际开始时间" prop="actualstartdate" >
						<el-date-picker v-model="model.actualstartdate" type="date" placeholder="实际开始时间" value-format="yyyy-MM-dd"></el-date-picker>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="实际完成时间" prop="actualenddate" >
						<el-date-picker v-model="model.actualenddate" type="date" placeholder="实际完成时间" value-format="yyyy-MM-dd"></el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="任务派发时间" prop="taskdistributedate" >
						<el-date-picker v-model="model.taskdistributedate" type="date" placeholder="任务派发时间" value-format="yyyy-MM-dd"></el-date-picker>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="任务进度" prop="taskschedule" >
						<el-input v-model="model.taskschedule"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="任务状态" prop="taskstate" >
						<el-input v-model="model.taskstate"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="所属里程碑名称" prop="milepostname" >
						<el-input v-model="model.milepostname" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="所属里程碑编码" prop="milepostcode" >
						<el-input v-model="model.milepostcode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="项目编号" prop="projectcode" >
						<el-input v-model="model.projectcode"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="项目名称" prop="projectname" >
						<el-input v-model="model.projectname"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="任务类型" prop="tasktype" >
						<el-input v-model="model.tasktype"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="任务优先级" prop="taskpriority" >
						<el-input v-model="model.taskpriority"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="运营部门" prop="operationdeptname" >
						<el-input v-model="model.operationdeptname"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="运营部门编码" prop="operationdeptcode" >
						<el-input v-model="model.operationdeptcode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="运营公司" prop="operationorgname" >
						<el-input v-model="model.operationorgname"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="运营公司编码" prop="operationorgcode" >
						<el-input v-model="model.operationorgcode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="申请公司" prop="applyorgname" >
						<el-input v-model="model.applyorgname"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="申请公司编码" prop="applyorgcode" >
						<el-input v-model="model.applyorgcode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="申请部门" prop="applydeptname" >
						<el-input v-model="model.applydeptname"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="申请部门编码" prop="applydeptcode" >
						<el-input v-model="model.applydeptcode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="所属公司" prop="orgcode" >
						<el-input v-model="model.orgcode"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="所属部门" prop="deptcode" >
						<el-input v-model="model.deptcode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="申请人姓名" prop="applyusername"  :rules="rules.validateRequire">
						<tl-ref-user v-model="model.applyusername" :initDisplayData.sync="model.dispapplyusername" dataType="code" :singleSelect="true"></tl-ref-user>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="申请人工号" prop="applyusercode" >
						<el-input v-model="model.applyusercode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="申请人姓名2" prop="username" >
						<el-input v-model="model.username"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="申请人工号2" prop="usercode" >
						<el-input v-model="model.usercode"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="提交时间" prop="submitdate" >
						<el-date-picker v-model="model.submitdate" type="date" placeholder="提交时间" value-format="yyyy-MM-dd"></el-date-picker>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="审批流程" prop="flowid" >
						<el-select v-model="model.flowid" filterable clearable>
							<el-option v-for="item in codeModel.flowidList" :key="item.id" :label="item.name" :value="parseInt(item.id)" />
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="单据状态" prop="state" >
						<el-select v-model="model.state" filterable clearable>
							<el-option v-for="item in codeModel.stateList" :key="item.code" :label="item.name" :value="parseInt(item.code)" />
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="备注" prop="description" >
						<el-input v-model="model.description" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="申请日期" prop="applydate" >
						<el-date-picker v-model="model.applydate" type="date" placeholder="申请日期" value-format="yyyy-MM-dd"></el-date-picker>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="任务说明" prop="taskexplain" >
						<el-input v-model="model.taskexplain" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="是否来源于模板" prop="istemplate" >
						<el-input v-model="model.istemplate"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="任务模板id" prop="tasktemplateid" >
						<el-input-number v-model="model.tasktemplateid" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="关键决策客户部门职务" prop="post" >
						<el-input v-model="model.post" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="任务支持程度" prop="customerapproval" >
						<el-select v-model="model.customerapproval" filterable clearable>
							<el-option v-for="item in codeModel.customerapprovalList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="客户接触现状" prop="customerattach" >
						<el-input v-model="model.customerattach" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="是否需要系统部支持" prop="needsupport" >
						<el-select v-model="model.needsupport" filterable clearable>
							<el-option v-for="item in codeModel.needsupportList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="关键客户关系提升计划" prop="improveplan" >
						<el-input v-model="model.improveplan" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="是否必填客户决策分析" prop="isneedcustomer" >
						<el-input-number v-model="model.isneedcustomer" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="24">
					<el-form-item label="任务目标" prop="tasktarget" >
						<el-input v-model="model.tasktarget" type="textarea" :rows="4"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="复制后是否修改" prop="copyedit" >
						<el-select v-model="model.copyedit" filterable clearable>
							<el-option v-for="item in codeModel.copyeditList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="复制来源类型" prop="copysourcetype" >
						<el-input v-model="model.copysourcetype"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="复制来源id" prop="copysourceid" >
						<el-input-number v-model="model.copysourceid" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="任务更新频次" prop="taskupdatefre" >
						<el-select v-model="model.taskupdatefre" filterable clearable>
							<el-option v-for="item in codeModel.taskupdatefreList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="任务更新时间" prop="taskupdatedate" >
						<el-date-picker v-model="model.taskupdatedate" type="date" placeholder="任务更新时间" value-format="yyyy-MM-dd"></el-date-picker>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="是否为短名单任务" prop="dmdtask" >
						<el-input-number v-model="model.dmdtask" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="是否获取决策链名单" prop="havenamelist" >
						<el-select v-model="model.havenamelist" filterable clearable>
							<el-option v-for="item in codeModel.havenamelistList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="是否进入短名单" prop="intonamelist" >
						<el-select v-model="model.intonamelist" filterable clearable>
							<el-option v-for="item in codeModel.intonamelistList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="履约评价/运行绩效得分" prop="performancescore" >
						<el-input v-model="model.performancescore"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="履约评价/运行绩效排名" prop="performancerank" >
						<el-input v-model="model.performancerank"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="是否获取审查会决策链名单" prop="reviewmeetname" >
						<el-select v-model="model.reviewmeetname" filterable clearable>
							<el-option v-for="item in codeModel.reviewmeetnameList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="国网供应商绩效评价得分" prop="guoscore" >
						<el-input v-model="model.guoscore"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="国网供应商绩效评价排名" prop="guorank" >
						<el-input v-model="model.guorank"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="国网供应商绩效评价档位" prop="guoposition" >
						<el-input v-model="model.guoposition"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="南网履约评价得分" prop="nankeepscore" >
						<el-input v-model="model.nankeepscore"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="南网履约评价排名" prop="nankeeprank" >
						<el-input v-model="model.nankeeprank"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="南网运行评价得分" prop="nanmovescore" >
						<el-input v-model="model.nanmovescore"></el-input>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="南网运行评价排名" prop="nanmoverank" >
						<el-input v-model="model.nanmoverank"></el-input>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="已获取审查会文件内容" prop="reviewmeetingdocument" >
						<el-select v-model="model.reviewmeetingdocument" filterable clearable>
							<el-option v-for="item in codeModel.reviewmeetingdocumentList" :key="item.code" :label="item.name" :value="item.code" />
						</el-select>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="策划id" prop="planid" >
						<el-input-number v-model="model.planid" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="源任务id" prop="tasksourceid" >
						<el-input-number v-model="model.tasksourceid" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
			</el-row>
			<el-row>
				<el-col :span="12">
					<el-form-item label="排序码" prop="sortcode">
						<el-input-number v-model="model.sortcode" controls-position="right" :step="1" :min="0" style="width:100%"></el-input-number>
					</el-form-item>
				</el-col>
				<el-col :span="12">
					<el-form-item label="有效" prop="enabled">
						<el-radio-group v-model="model.enabled">
							<el-radio :label="parseInt(item.code)" v-for="item in codeModel.enabledList" :key="item.code">{{ item.name }}</el-radio>
						</el-radio-group>
					</el-form-item>
				</el-col>
			</el-row>
    </el-form>
    <div slot="footer" class="dialog-footer">
      <el-button :type="disableEditSubmit === false ? 'text' : 'primary'" @click="doCancelEdit">取消</el-button>
      <el-button type="primary" @click="doSubmitEdit" :loading="saveLoading" v-if="disableEditSubmit === false">确认</el-button>
    </div>
  </el-dialog>
</template>

<script>
/** mixins */
import { mixin_edit } from '@tapui/mixins/mixin_edit'
/** 子组件 */
/** 工具类 */
import { putAction, getAction, postAction, deleteAction } from '@tapui/utils/http'
/** VUE配置 */
export default {
  mixins: [mixin_edit],
  components: { },
  data() {
    return {
      moduleTitle: '项目任务历史表',
      urlPrefix: '/mpm/projectTaskHistory/',
      url: {
        // 额外的url
      }
    }
  },
  methods: {
    loaded() {
      // 页面加载完毕执行
    }
  }
}
</script>

